"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebUtil = void 0;
class WebUtil {
    static getIpByExpressReq(req) {
        let ip = req.headers['X-Real-IP'] || req.connection.remoteAddress;
        if (ip.indexOf('::ffff:') != -1) {
            ip = ip.substring(7);
        }
        return ip;
    }
}
exports.WebUtil = WebUtil;
